//
//  SISSUploadSellerEntrustContractViewController.m
//  SISSAPP
//
//  Created by 袁应荣 on 2019/7/4.
//  Copyright © 2019 优房网. All rights reserved.
//

#import "SISSUploadSellerEntrustContractViewController.h"

#import "SISSNetworkingManager+HouseProgress.h"

@interface SISSUploadSellerEntrustContractViewController ()

@end

@implementation SISSUploadSellerEntrustContractViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"二手房卖方委托合同";
}

- (void)confirmButtonClickAction {
    if (self.contractNoView.rightTextField.text.length == 0) {
        [SISSTools showSVErrorTitle:@"请输入合同编号" andTime:2 andColor:YES];
        return;
    }
    if (self.contractDateChooseView.rightStr.length == 0) {
        [SISSTools showSVErrorTitle:@"请选择合同截止日期" andTime:2 andColor:YES];
        return;
    }
    if (self.uploadImageView.images.count == 0) {
        [SISSTools showSVErrorTitle:@"请添加合同文本图片" andTime:2 andColor:YES];
        return;
    }
    NSDictionary *parameters = @{
                                 @"abpId" : @"",
                                 @"contractNum" : @"",
                                 @"endTime" : @"",
                                 @"otherdesc" : @"",
                                 };
    [kNetworkManager insertHouseEntrustContractWithParameters:parameters images:self.uploadImageView.images success:^(id responseObject) {
        [self pushToSuccessViewWithPopBackClassType:SISSProgressPopBackClassTypeHouse];
    } failed:^(NSError *error) {
        
    }];
    
}

@end
